package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.UpdateVersionService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.UpdateVersionSearchRequest;
import com.tuanzi.loan.vo.response.family.UpdateVersionSearchResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

public class UpdateVersionLazyDataModel extends LazyDataSessionModel<UpdateVersionSearchRequest, UpdateVersionSearchResponse> {

	private UpdateVersionService updateVersionService;

	public UpdateVersionLazyDataModel(UpdateVersionSearchRequest updateVersionSearchRequest, CurrentUserBean session, UpdateVersionService updateVersionService) {
		super(updateVersionSearchRequest, session);
		this.updateVersionService = updateVersionService;
	}

	@Override
	protected Page<UpdateVersionSearchResponse> doLoad0(PageSearcher<UpdateVersionSearchRequest> pageSearcher) {
		return updateVersionService.list(pageSearcher);
	}
}
